package com.bbcloud.controller.portal;

import com.bbcloud.common.ServerResponse;
import com.bbcloud.pojo.Device;
import com.bbcloud.service.IDeviceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created by liuzhu on 2018/12/27.
 */
@Controller
@RequestMapping("/device/")
public class DeviceController {

    @Autowired
    IDeviceService iDeviceService;

    @RequestMapping("info.do")
    @ResponseBody
    public ServerResponse<Device> list(@RequestParam(value = "token", required = false) String token, @RequestParam(value = "userId", required = false) String userId, @RequestParam(value = "deviceId", required = false) String deviceId) {
        return iDeviceService.selectDeviceWithDeviceId(token,userId,deviceId);
    }
}
